Accumulation buffers are used in graphical image processing to accomplish a number of effects, including anti-aliasing, motion blur, enhanced depth perception, and soft shading. In general, an accumulation buffer is used to combine multiple frames to produce a composite frame. Each of the multiple frames is typically combined with the accumulation buffer by calculating, for each pixel of the frame, a weighted average of the pixel with a corresponding pixel of the accumulation buffer. Each of the above-listed effects are achieved by altering a single graphical image slightly to produce a number of slightly different frames and accumulating the frames in the accumulation buffer.
Aliasing refers to jagged edges on graphical objects represented in a rasterized image. For example, a line which is slanted, i.e., neither fully horizontal nor fully vertical, appears to be jagged when displayed in a rectangular grid of pixels of a computer display device. The jagged quality is a result of rounding floating point values to integer pixel addresses. Anti-aliasing generally refers to graphical alteration of a graphical object or image to remove the appearance of jagged edges. An accumulation buffer is used to produced an anti-aliased image by "jittering" the image. In other words, the graphical image is rendered into the accumulation buffer. Then the graphical image is translated, i.e., moved, by a fraction of a pixel and is rendered again to produce a slightly translated frame. Rendering the graphical image as translated causes the jags in the various edges of the various graphical objects rendered to appear in slightly different places. The slightly translated frame is then accumulated with the previously rendered frame in the accumulation buffer and the resulting frame is stored in the accumulation buffer. The translation, rendering and accumulation of frames of the graphical image is repeated a number of times, e.g., 60 times. The result is an averaging of a number of frames in which jags in the edges of graphical objects in a graphical image are smoothed, providing the appearance of smooth edges.
An accumulation buffer is used in a similar fashion to blur graphical objects in motion. In computer generated animation, objects in motion often have no blur, i.e., appear to have very sharp edges. When an object with sharp edges moves quickly across a television or movie screen or across a computer display device in a motion video display, the appearance is very unnatural and disturbing to the viewer. To achieve a more natural blurring of the object in motion, a graphical image in which an object is in motion is repeatedly rendered with the object in different position along the path of motion of the object and the resulting frames are accumulated in the accumulation buffer. The resulting accumulated frame includes an image of the moving graphical object which is blurred along the path of motion of the graphical object and a considerably more natural and pleasing animated video display.
An accumulation buffer is also used to enhance depth perception in a three-dimensional graphical image. Depth perception is enhanced by blurring graphical objects distant from the viewer while preserving sharpness in graphical objects nearer the viewer. This result is achieved by repeatedly rendering the three-dimensional image from slightly varying perspectives. Altering the perspective of a three-dimensional graphical image results in greater movement of graphical object further from the viewer relative to movement of objects nearer the viewer. Accumulation of frames corresponding to slightly varied perspectives therefore results in blurring of graphical objects substantially proportional to the distance of the graphical objects from the viewer. Thus, depth perception in the rendered and accumulated graphical image is enhanced substantially.
An accumulation buffer is further used to soften shadows in a rendered graphical image. Because of the precision of computers in rendering three-dimensional graphical images, shadows portrayed in such rendered graphical images are particularly sharp, resulting in an unnatural, surreal appearance of the graphical image. Shadows in such a graphical image are softened by repeatedly rendering the graphical image with the respective positions of various virtual light sources, which define the lighting characteristics of the graphical image, varied slightly and the resulting frames are accumulated in the accumulation buffer. Since each frame corresponds to a slightly different light source position, shadows in each frame are in a slightly different position. The accumulated frame in the accumulation buffer therefore has softer shadows, as if from a more diffused light source. The resulting displayed graphical image is more natural and realistic.
It is common for a graphical image to be as large as a rectangular grid of one thousand rows by one thousand columns of pixels. Such a graphical image has one million pixels. If the graphical image is in color, each pixel has four components, namely, red, green, blue, and alpha. To accumulate each component of a single pixel of a graphical image with a pixel stored in the accumulation buffer typically requires two memory read operations, two multiplication operations, one addition operation, and one memory store operation. Reading the four components of a color pixel typically requires a single read of a 32-bit word from memory and execution of approximately eleven computer instructions to parse each eight-bit component from the 32-bit word. To accumulate a single graphical image having four components per pixel and one million pixels therefore requires two million read operations, execution of twenty-two million parsing computer instructions, eight million multiplication operations, four million addition operations, and four million store operations.
It is common to accumulate as many as 60 frames to produce a single anti-aliased color graphical image, requiring 120 million read operations, execution of 1.32 billion parsing computer instructions, 480 million multiplication operations, 240 million addition operations, and 240 million store operations. Image processing using accumulation buffers therefore requires substantial computer resources. Accordingly, ever increasing efficiency in accumulation buffer mechanisms for use in image processing persists as a need in the industry.